package com.ita.dom.handler;

import java.util.List;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ita.dom.entity.WeiBo;

public class WeiBoJsonHandler {

	private String result;
	public String CreateJackson(List<WeiBo> list){
		System.out.println("object to json:");
		ObjectMapper mapper=new ObjectMapper();
		try {
			result=mapper.writeValueAsString(list);
		} catch (JsonProcessingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println(result);
		System.out.println("object to json end");
		return result;
		
	}
	
}
